@extends('layouts.admin-app')

@section('content')

	<div class="contentpanel panel-email">

		<div class="row">

			<div class="col-sm-9 col-lg-12">

				<div class="panel panel-default">
					<div class="panel-heading">
						<h4 class="panel-title">编辑用户</h4>
					</div>

					<form class="form-horizontal form-bordered" action="{{ route('admin.admin_user.update',['id'=>$user->id]) }}" method="POST">

						<div class="panel-body panel-body-nopadding">
							<div class="form-group">
								<label class="col-sm-3 control-label" for="checkbox">所属角色组</label>
								<div class="col-sm-6">
									@inject('rolePresenter','App\Presenters\RolePresenter')

									{!! $rolePresenter->rolesCheckbox($hasRoles) !!}
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">用户名 <span class="asterisk">*</span></label>

								<div class="col-sm-6">
									<input type="text"  data-toggle="tooltip" name="name"
										   data-trigger="hover" class="form-control tooltips"
										   data-original-title="不可重复" value="{{ $user->name }}">
								</div>
							</div>

							<div class="form-group">
                                <label class="col-sm-3 control-label">真实姓名 <span class="asterisk">*</span></label>

                                <div class="col-sm-6">
                                    <input type="text"  data-toggle="tooltip" name="realname"
                                           data-trigger="hover" class="form-control tooltips"
                                           value="{{ $user->realname }}">
                                </div>
                            </div>
<!-- 
							<div class="form-group">
								<label class="col-sm-3 control-label">密码 <span class="asterisk">*</span></label>

								<div class="col-sm-6">
									<input type="password"  data-toggle="tooltip" name="password"
										   data-trigger="hover" class="form-control tooltips"
										   placeholder="不修改密码请留空"
										   data-original-title="请输入密码"
										   value="{{$user->pas}}" >
								</div>
							</div> -->

							<input type="hidden" name="_method" value="PUT">
							{{ csrf_field() }}
						</div><!-- panel-body -->

						<div class="panel-footer">
							<div class="row">
								<div class="col-sm-6 col-sm-offset-3">
									<button class="btn btn-primary">保存</button>
								</div>
							</div>
						</div><!-- panel-footer -->

					</form>
				</div>

			</div><!-- col-sm-9 -->

		</div><!-- row -->

	</div>
@endsection
